﻿using Common.AspNetCore;
using Common.EF;
using System;
using System.Threading.Tasks;

namespace FCP.Api.Repository
{
    public class FCPRepository : CoreRepository
    {
        private readonly ICommonModelRepository repository;

        public FCPRepository(IServiceProvider provider, ICommonModelRepository repository)
            : base(provider)
        {
            this.repository = repository;
        }

        public ICommonRepository CommonRepository
        {
            get { return this.Repository; }
        }

        public ICommonModelRepository CommonModelRepository
        {
            get { return this.repository; }
        }

        public async Task CommitChangesByCommonAsync(Action func)
        {
            await CommitChangesAsync(func);
        }

    }
}
